package com.phpxiu.app.supports.qq;

import android.os.Bundle;

import com.tencent.connect.share.QQShare;
import com.tencent.connect.share.QzoneShare;

import java.util.ArrayList;

/**
 * @file
 * @brief QQ空间分享内容定义
 * @author 吴金洲
 * @note  QQ空间分享内容定义
 *
 */
public class ZoneShareContent {
    public Bundle content=new Bundle();

    public ZoneShareContent(String title, String targetUrl) {
        content.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QQShare.SHARE_TO_QQ_TYPE_DEFAULT);
        content.putString(QzoneShare.SHARE_TO_QQ_TITLE, title);
        content.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, targetUrl);
    }

    /**
     * 设置分享文字内容
     */
    public void setSummary(String summary){
        this.content.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, summary);
    }

    /**
     * 分享图片
     */
    public void setImageUrl(String imageUrl){
        ArrayList<String> urls=new ArrayList<String>();
        urls.add(imageUrl);
        this.content.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL,urls);
    }

}
